package com.ruoyi.quantify.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.quantify.mapper.QuantifyRuleMapper;
import com.ruoyi.quantify.domain.QuantifyRule;
import com.ruoyi.quantify.service.IQuantifyRuleService;

/**
 * 量化考核规则Service业务层处理
 * 
 * @author yepanpan
 * @date 2021-05-14
 */
@Service
public class QuantifyRuleServiceImpl implements IQuantifyRuleService 
{
    @Autowired
    private QuantifyRuleMapper quantifyRuleMapper;

    /**
     * 查询量化考核规则
     * 
     * @param id 量化考核规则ID
     * @return 量化考核规则
     */
    @Override
    public QuantifyRule selectQuantifyRuleById(Long id)
    {
        return quantifyRuleMapper.selectQuantifyRuleById(id);
    }

    /**
     * 查询量化考核规则列表
     * 
     * @param quantifyRule 量化考核规则
     * @return 量化考核规则
     */
    @Override
    public List<QuantifyRule> selectQuantifyRuleList(QuantifyRule quantifyRule)
    {
        return quantifyRuleMapper.selectQuantifyRuleList(quantifyRule);
    }

    /**
     * 新增量化考核规则
     * 
     * @param quantifyRule 量化考核规则
     * @return 结果
     */
    @Override
    public int insertQuantifyRule(QuantifyRule quantifyRule)
    {
        return quantifyRuleMapper.insertQuantifyRule(quantifyRule);
    }

    /**
     * 修改量化考核规则
     * 
     * @param quantifyRule 量化考核规则
     * @return 结果
     */
    @Override
    public int updateQuantifyRule(QuantifyRule quantifyRule)
    {
        return quantifyRuleMapper.updateQuantifyRule(quantifyRule);
    }

    /**
     * 批量删除量化考核规则
     * 
     * @param ids 需要删除的量化考核规则ID
     * @return 结果
     */
    @Override
    public int deleteQuantifyRuleByIds(Long[] ids)
    {
        return quantifyRuleMapper.deleteQuantifyRuleByIds(ids);
    }

    /**
     * 删除量化考核规则信息
     * 
     * @param id 量化考核规则ID
     * @return 结果
     */
    @Override
    public int deleteQuantifyRuleById(Long id)
    {
        return quantifyRuleMapper.deleteQuantifyRuleById(id);
    }
}
